﻿import clr #for clr only utils like str.Trim
import nt

cwd = nt.getcwd()
svnpath = cwd[: cwd.index(r'\Svn') + 5]

def grabsettings():
    settingsfile = open(svnpath + r'SunRayEngine\SunRayEngineTest\SunRayEngineTest\SunRayEngineTest\Settings.txt', 'r')
    settings = {}
    for line in settingsfile.readlines():
        data = line.split(':', 1)
        name, val = data[0], data[1].Trim()
        settings[name] = val

    return settings

def compsettings(game, settings):
    if settings['WinResizable'] == "True":
        game.Window.AllowUserResizing = True